"""
创建一个背景为蓝色的 Pygame 窗口
"""
import sys

import pygame

class Blue_window:
    
    def __init__(self):
        pygame.init()
        self.screen = pygame.display.set_mode((640, 480))
    
    def run_game(self):
       
        while True:
            for event in pygame.event.get():
                if event.type == pygame.QUIT:
                    sys.exit()
            self.screen.fill((127, 127, 255))
            pygame.display.flip()

game = Blue_window()
game.run_game()